home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls036.1.Z / tls036.1 / usr / lib / scosmt / scriptlib / config / linkchk / linkchk
Encoding:
Text File  |  1992-09-15  |  1.1 KB  |  43 lines

  1. #
  2. # Test to see if link kit is installed.
  3. #
  4. linkchk()  {
  5.     # Set PERM variable used in linkchk(). 
  6.     if [ -f /etc/perms/extmd ]; then
  7.         PERM=/etc/perms/extmd
  8.     elif [ -f /etc/perms/inst ]; then
  9.         PERM=/etc/perms/inst
  10.     else
  11.         error "Cannot locate LINK packages permlist. 
  12. Needed to verify linkkit installation"
  13.         return 1    
  14.     fi
  15.  
  16.     # Test to see if link kit is installed.
  17.     until    fixperm -i -d LINK $PERM
  18.     do    case $? in
  19.         4)  echo "\nThe Link Kit is not installed."         ;;
  20.         5)  echo "\nThe Link Kit is only partially installed."     ;;
  21.         *)  error "fixperm failed testing for Link Kit.  Exiting."
  22.             return 1      ;;
  23.         esac
  24.  
  25.         # Not fully installed. Do so here.
  26.         echo "\nThe link kit must be installed to run this program."
  27.         getyn "\nDo you wish to install it now?" || {
  28.             # Answered no.
  29.             echo "\nThe linkkit is not installed."
  30.             return 1    
  31.         }
  32.  
  33.         # Answered yes, so install the link kit.
  34.         echo "\nInvoking /etc/custom\n"
  35.         /etc/custom -o -i LINK || {
  36.             # Custom exited unsuccessfully.
  37.             error "Custom failed to install Link Kit successfully." 
  38.             return 1
  39.         }
  40.     done
  41.     return 0
  42. }
  43.